# CMake 最低支持版本
cmake_minimum_required(VERSION 3.27)
# 项目名称 KitharaExhibit 版本：0.1 编写语言：C++
project(KitharaVision VERSION 0.1.0 LANGUAGES CXX)
# C++标准
set(CMAKE_CXX_STANDARD 23)

# # 定义构建类型
# if (CMAKE_BUILD_TYPE MATCHES "Debug")
#     set(BUILD_TYPE "Debug")
# else ()
#     set(BUILD_TYPE "Release")
#     # Release 设置代码运行优化
#     set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -O2")
#     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
# endif ()

# # 添加定义
# add_definitions(
#     -DWIN32_LEAN_AND_MEAN
# )

# 设定输出目录
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)

# 设置编码格式为utf-8
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

list(APPEND CMAKE_MODULE_PATH  "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(LinkControl_x64 REQUIRED)
include(FetchContent)
include(cmake/sml.cmake)

# 添加子项目
add_subdirectory(TestApp)
add_subdirectory(TestKernel)
add_dependencies(TestApp TestKernel)
